153 research outputs found

    Data Structures & Algorithm Analysis in C++

    Get PDF
    This is the textbook for CSIS 215 at Liberty University.https://digitalcommons.liberty.edu/textbooks/1005/thumbnail.jp

    A Representation and Algorithm for Exact Computation of Cascaded Polygon Intersections with Fixed Storage Requirements

    Get PDF
    Given a collection of polygons (or a collection of sets of polygons) with vertex points specified to some fixed-point precision, a technique is presented for accurately representing the intersection points formed by elements in the collection. In particular, we recognize that in 2D, the result of a series of intersections between polygons must be composed of line segments that are part of the line segments making up the original polygons. While our techniques greatly improve the accuracy of floating point representations for intersection points, we also provide algorithms based on rational arithmetic that compute these intersection points exactly. The storage required to represent an intersection vertex is slightly greater than four times the number of bits in the input resolution. Furthermore, no intermediate quantity requires resolution slightly greater than four times the resolution resolution of input vertex values, so implementation on existing computers at practical resolution can easily be done. Cascaded intersection operations do not require ever greater amounts of storage for vertex points, as would normally be required by a rational arithmetic approach. We also prove that a similar approach is not possible for any reasonable set of rotations

    Analysis of the Worst Case Space Complexity of a PR Quadtree

    Get PDF
    We demonstrate that a resolution-r PR quadtree containing n points has, in the worst case, at most nodes. This captures the fact that as n tends towards 4r, the number of nodes in a PR quadtree quickly approaches O(n). This is a more precise estimation of the worst case space requirement of a PR quadtree than has been attempted before

    Parallel Load Balancing Strategies for Ensembles of Stochastic Biochemical Simulations

    Get PDF
    The evolution of biochemical systems where some chemical species are present with only a small number of molecules, is strongly influenced by discrete and stochastic effects that cannot be accurately captured by continuous and deterministic models. The budding yeast cell cycle provides an excellent example of the need to account for stochastic effects in biochemical reactions. To obtain statistics of the cell cycle progression, a stochastic simulation algorithm must be run thousands of times with different initial conditions and parameter values. In order to manage the computational expense involved, the large ensemble of runs needs to be executed in parallel. The CPU time for each individual task is unknown before execution, so a simple strategy of assigning an equal number of tasks per processor can lead to considerable work imbalances and loss of parallel efficiency. Moreover, deterministic analysis approaches are ill suited for assessing the effectiveness of load balancing algorithms in this context. Biological models often require stochastic simulation. Since generating an ensemble of simulation results is computationally intensive, it is important to make efficient use of computer resources. This paper presents a new probabilistic framework to analyze the performance of dynamic load balancing algorithms when applied to large ensembles of stochastic biochemical simulations. Two particular load balancing strategies (point-to-point and all-redistribution) are discussed in detail. Simulation results with a stochastic budding yeast cell cycle model confirm the theoretical analysis. While this work is motivated by cell cycle modeling, the proposed analysis framework is general and can be directly applied to any ensemble simulation of biological systems where many tasks are mapped onto each processor, and where the individual compute times vary considerably among tasks

    A Framework to Analyze the Performance of Load Balancing Schemes for Ensembles of Stochastic Simulations

    Get PDF
    Ensembles of simulations are employed to estimate the statistics of possible future states of a system, and are widely used in important applications such as climate change and biological modeling. Ensembles of runs can naturally be executed in parallel. However, when the CPU times of individual simulations vary considerably, a simple strategy of assigning an equal number of tasks per processor can lead to serious work imbalances and low parallel efficiency. This paper presents a new probabilistic framework to analyze the performance of dynamic load balancing algorithms for ensembles of simulations where many tasks are mapped onto each processor, and where the individual compute times vary considerably among tasks. Four load balancing strategies are discussed: most-dividing, all-redistribution, random-polling, and neighbor-redistribution. Simulation results with a stochastic budding yeast cell cycle model is consistent with the theoretical analysis. It is especially significant that there is a provable global decrease in load imbalance for the local rebalancing algorithms due to scalability concerns for the global rebalancing algorithms. The overall simulation time is reduced by up to 25%, and the total processor idle time by 85%

    An Optimal Boundary to Quadtree Conversion Algorithm

    Get PDF
    An algorithm is presented for converting a boundary representation for an image to its region quad-tree representation. Our algorithm is designed for operation on the linear quadtree representation, although it can easily be modified for the traditional pointer-based quadtree representation. The algorithm is a two phase process that first creates linear quadtree node records for each of the border pixels. This list of pixels is then sorted by locational code. The second processing phase fills in the nodes interior to the polygons by simulating a traversal of the corresponding pointer-based quadtree. Three previous algorithms [Same80, Mark85a, Atki86] have described similar conversion routines requiring time complexity of O(n.B)for at least one of the two phases, where B is the number of boundary pixels and n is the depth of the final tree for a 2" x 2" image. A fourth algorithm [Webb84] can perform the border construction of this conversion in time O(n+B) with the restriction that the polygon must be positioned at constrained locations in the image space. Our algorithm requires time O(n + B) for the second phase, which is optimal. The first phase can be performed using the algorithm of [Webb84] for total conversion time of O(n + B) with constrained location, or in time O(B log B) using a simple sort to order the border pixels with no restriction in polygon location

    Linear Time Distance Transforms for Quadtrees

    Get PDF
    Linear time algorithms are given for computing the chessboard distance transform for both pointer-based and linear quadtree representations. Comparisons between algorithmic styles for the two representations are made. Both versions of the algorithm consist of a pair of tree traversals

    Device Independent Perspective Volume Rendering Using Octrees

    Get PDF
    This paper describes a reasonably fast, space efficient algorithm for volume rendering. The algorithm is device independent since it is written as an X Windows client. It makes no graphics calls to dedicated graphics hardware, but allows the X server to take advantage of such hardware when it exists. It can be run on any machine that supports X windows, from an IBM-PC to a high-end graphics workstation. It produces a perspective projection of the volume, since perspective projections are generally easier to interpret than parallel projections. The algorithm uses progressive refinement to give the user a quick view of the dataset and how it is oriented. If a different orientation or dataset is desired, the user may interrupt the rendering process. Once the desired dataset and position have been determined, the progressive refinement process continues and the image improves in quality until the greatest level of detail is displayed

    A Real Time Robot Arm Collision Detection System

    Get PDF
    A data structure and update algorithm are presented for a prototype real time collision detection safety system for a multi-robot environment. The data structure is a variant of the octree, which serves as a spacial index. An octree recursively decomposes three dimensional space into eight equal cubic octans until each octant meets some decomposition criteria. Our octree stores cylspheres (cylinders with spheres on each end) and rectangular solids as primitives (other primitives can easily be added as required). These primitives make up the two seven-degrees-of-freedom robot arms and environment modeled by the system. Octree nodes containing more than a predetermined number N of primitives are decomposed. This rule keeps the octree small, as the entire environment for our application can be modeled using a few dozen primitives. As robot arms move, the octree is updated to reflect their changed positions. During most update cycles, any given primitive does not change which octree node it is in. Thus, modification to the octree is rarely required. Incidents in which one robot arm comes too close to another arm or an object are reported. Cycle time for interpreting current joint angles, updating the octree, and detecting/reporting imminent collisions averages 30 milliseconds on an Intel 80386 processor running at 20 MHz

    A Mathematical Programming Formulation for the Budding Yeast Cell Cycle

    Get PDF
    The budding yeast cell cycle can be modeled by a set of ordinary differential equations with 143 rate constant parameters. The quality of the model (and an associated vector of parameter settings) is measured by comparing simulation results to the experimental data derived from observing the cell cycles of over 100 selected mutated forms. Unfortunately, determining whether the simulated phenotype matches experimental data is difficult since the experimental data tend to be qualitative in nature (i.e., whether the mutation is viable, or which development phase it died in). Because of this, previous methods for automatically comparing simulation results to experimental data used a discontinuous penalty function, which limits the range of techniques available for automated estimation of the differential equation parameters. This paper presents a system of smooth inequality constraints that will be satisfied if and only if the model matches the experimental data. Results are presented for evaluating the mutants with the two most frequent phenotypes. This nonlinear inequality formulation is the first step toward solving a large-scale feasibility problem to determine the ordinary differential equation model parameters
    corecore